﻿namespace NTLib.Core.Collection.Tree
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TSeq">The type of the seq.</typeparam>
    /// <typeparam name="TValue">The type of the value.</typeparam>
    /// <seealso cref="NTLib.Core.Collection.Tree.TreeNode{TSeq}" />
    public class TreeLevelNode<TSeq, TValue> : TreeNode<TSeq>
    {
        #region Fields

        private readonly Dictionary<TSeq, TreeNode<TSeq>> _nodes;

        #endregion

        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="TreeLevelNode{TSeq, TValue}"/> class.
        /// </summary>
        public TreeLevelNode()
        {
            this._nodes = new Dictionary<TSeq, TreeNode<TSeq>>();
        }

        #endregion

        #region Methods

        /// <summary>
        /// Inserts the specified key parts.
        /// </summary>
        /// <param name="keyParts">The key parts.</param>
        /// <param name="index">The index.</param>
        /// <param name="replace">if set to <c>true</c> [replace].</param>
        /// <param name="value">The value.</param>
        /// <exception cref="NotImplementedException"></exception>
        public void Insert(TSeq[] keyParts, int index, bool replace, TValue value)
        {
            var part = keyParts[index];

            TreeNode<TSeq> node = null;

            if (!this._nodes.TryGetValue(part, out node))
            {
            }
        }

        #endregion
    }
}
